import Vue from 'vue'
import App from './App'
import { http,api } from './utils/https'

import './static/css/reset.css'

Vue.config.productionTip = false

//图片服务器
const imgUrlBase = 'http://q45cindpk.bkt.clouddn.com/'

// js
import {
  showBackModal,
  isEmpty,
  distinct,
  paddingZero,
  formatTime,
  previewFile,
  uploadFiles,
  chooseMessageFile,
  getDates,
  getRelativeDate,
  getWeekList,
  removeEmptyValueFromObject,
  getWeek
} from "./assets/js/common";
import {Base64} from './assets/js/Base64'

Object.assign(Vue.prototype,{
  $http:http,
  $api:api,
  $imgUrlBase:imgUrlBase,
  $showBackModal:showBackModal,
  $isEmpty:isEmpty,
  $distinct:distinct,
  $paddingZero:paddingZero,
  $formatTime:formatTime,
  $getRelativeDate:getRelativeDate,
  $getWeekList:getWeekList,
  $getWeek:getWeek,
  $uploadFiles:uploadFiles,
  $chooseMessageFile:chooseMessageFile,
  $previewFile:previewFile,
  $getDates:getDates,
  $removeEmptyValueFromObject:removeEmptyValueFromObject,
  $Base64:Base64,
})

App.mpType = 'app'

const app = new Vue({
  ...App
})
app.$mount()
